Total Complexity | 3 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | import { Injectable } from "@angular/core"; |
||
9 | |||
10 | @Injectable() |
||
11 | export class AnonymousAuth extends AbstractAuth implements IAuthProvider { |
||
12 | public readonly providerKey = "anonymous"; |
||
13 | public readonly defaultOptions: IAnonymousAuthOptions = {}; |
||
14 | |||
15 | public constructor( |
||
16 | angularFireAuth: AngularFireAuth, |
||
17 | platform: Platform, |
||
18 | config: UniFirebaseLoginConfigProvider, |
||
19 | ) { |
||
20 | super(angularFireAuth, platform, config); |
||
21 | } |
||
22 | |||
23 | public async signInNative(options: any): Promise<auth.UserCredential> { |
||
24 | return this.signInBrowser(); |
||
25 | } |
||
26 | |||
27 | public async signInBrowser(): Promise<auth.UserCredential> { |
||
28 | return await auth().signInAnonymously(); |
||
29 | } |
||
30 | |||
31 | protected getBrowserSignInProvider(): null { |
||
32 | return null; |
||
33 | } |
||
35 |